package com.cssl.service.serviceimpl;

import com.cssl.Dao.UsersDao;
import com.cssl.entity.Users;
import com.cssl.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersDao usersDao;
    @Override
    public Users save(Users users) {
        return usersDao.save(users);
    }

    @Override
    public List<Users> findAll() {
        return usersDao.findAll();
    }

    @Override
    public List<Users> findByname(String name) {
        return usersDao.findByname(name);
    }

    @Override
    public List<Users> findBynameAndPassword(String name, int password) {
        return usersDao.findBynameAndPassword(name,password);
    }
}
